cargo_new: remove redundant leading new lines from ignore files
authorOrestis Floros <orestisf1993@gmail.com>
Sat, 31 Mar 2018 14:26:58 +0000 (17:26 +0300)
committerOrestis Floros <orestisf1993@gmail.com>
Sat, 31 Mar 2018 14:40:44 +0000 (17:40 +0300)
commitdbb1abd81489be61a01d69ef37810caa32dae448
tree9253cc99444c2993918f9252ee655e88018d723a
parent3548057fb91d05514e0aa18840e94174f480c175
cargo_new: remove redundant leading new lines from ignore files

Only add a leading new line in .gitignore/.hgignore/.ignore files when
the file existed before 'cargo new'.

Fixes #5265.
src/cargo/ops/cargo_new.rs
tests/testsuite/init.rs